﻿package com.crayon.job
{
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFormat;
	import flash.text.TextFieldAutoSize;
	
	/**
	 * ...
	 * @author 蜡笔
	 */
	public class CopyRightBox extends Sprite
	{
		/**
		 * 显示DEMO水印信息
		 * @param	isShowName	是否显示“蜡笔”版权信息
		 */
		public function CopyRightBox(isShowName:Boolean = false)
		{
			var txt:TextField = new TextField();
			if (isShowName)
				//蜡笔版权所有,请及时注册
				txt.text = String.fromCharCode(32, 34593, 31508, 29256, 26435, 25152, 26377, 10, 32, 35831, 21450, 26102, 27880, 20876);
			else
				txt.text = "  " + String.fromCharCode(68, 69, 77, 79);
			
			txt.x = 12;
			txt.y = 28;
			txt.mouseEnabled = false;
			txt.autoSize = TextFieldAutoSize.LEFT;
			var tf:TextFormat = new TextFormat();
			tf.size = 40;
			tf.align = "center";
			tf.color = 0xFFFFFF;
			txt.setTextFormat(tf);
			addChild(txt);
			graphics.lineStyle(1, 0xFFFFFF);
			graphics.beginFill(0x000000, .3);
			graphics.drawRect(0, 0, txt.width + 30, txt.height + 40);
			graphics.endFill();
		}
	}
}